<?php foreach ($users_online as $user): ?>

<?php echo link_to($user->getsfGuardUser(),'Profile/show?id='.$user->getsfGuardUser()->getId()); ?>

<?php endforeach ?>